<nav class="navbar navbar-default" role="navigation">
	<div class="container-fluid">
	<div class="navbar-header">
		<a class="navbar-brand" id="dasd" href="#">智能访客管理系统</a>
	</div>
	<div>
     <% if @current_editor.present? %>
		<ul class="nav navbar-nav">
      <li class="nav-item <%= active_controller(params, 'villages') %>">
         <a class="nav-link" href="/villages">小区 <span class="sr-only">(current)</span></a>
       </li>
       <% if @current_editor.system? || @current_editor.estate? %>
         <li class="nav-item <%= active_controller(params, 'editors') %>">
           <a class="nav-link" href="/editors">管理员 <span class="sr-only">(current)</span></a>
         </li>
       <% end %>
       <% if @current_editor.system? || @current_editor.estate? %>
         <li class="nav-item <%= active_controller(params, 'buildings') %>">
           <a class="nav-link" href="/buildings">楼栋 <span class="sr-only">(current)</span></a>
         </li>
       <% end %>
       <% if @current_editor.system? %>
         <li class="nav-item <%= active_controller(params, 'guests') %>">
           <a class="nav-link" href="/guests">访客 <span class="sr-only">(current)</span></a>
         </li>
       <% end %>
       <% if @current_editor.system? %>
         <li class="nav-item <%= active_controller(params, 'users') %>">
           <a class="nav-link" href="/users">业主 <span class="sr-only">(current)</span></a>
         </li>
       <% end %>
       <li class="nav-item <%= active_controller(params, 'cars') %>">
         <a class="nav-link" href="/cars">进出车辆 <span class="sr-only">(current)</span></a>
       </li>
       <li class="nav-item <%= active_controller(params, 'interviews') %>">
         <a class="nav-link" href="/interviews">访问记录 <span class="sr-only">(current)</span></a>
       </li>
		</ul>
		 <ul class="nav navbar-nav navbar-right">
			 <li>
				 <a><%= @current_editor.current_role %> <%= @current_editor.name %></a>
 			</li>
			 <li>
 				<a class="nav-link" href="/session" data-method="delete" style="color: red">退出 <span class="sr-only">(current)</span></a>
 			</li>
		 </ul>
    <% end %>
	</div>
	</div>
</nav>
